/*
 * @Author: 依旧 1127740739@qq.com
 * @Date: 2025-04-19 01:00:59
 * @LastEditors: 依旧 1127740739@qq.com
 * @LastEditTime: 2025-04-19 01:24:53
 * @FilePath: \app-case\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { createRouter, createWebHistory } from "vue-router";
import type { RouteRecordRaw } from "vue-router";

const routes: RouteRecordRaw[] = [
  {
    path: "/",
    component: () => import('@/layout/Layout.vue'),
    children: [
      {
        path: "",
        name: "home",
        component: () => import('@/views/Home.vue'),
      }
    ],
  },
  {
    path: "/",
    component: () => import('@/layout/SimpleLayout.vue'),
    children: [
      {
        path: "button",
        name: "button",
        component: () => import('@/views/ButtonDemo.vue'),
      },
      {
        path: "form",
        name: "form",
        component: () => import('@/views/FormDemo.vue'),
      },
      {
        path: "table",
        name: "table",
        component: () => import('@/views/TableDemo.vue'),
      },
    ],
  },
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});

export default router;
